package cn.visu.dao;

import cn.visu.bean.Token;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by 程振奇 on 2017/8/8.
 */
@Service
public class TokenDao {
    @Autowired
    private SqlSessionTemplate sqlSessionTemplate;

    public Token findTokenByUserName(String username) {
        return sqlSessionTemplate.selectOne(Token.class.getName() + "findTokenByUserName", username);

    }

}
